import 'package:flutter/material.dart';

class OverFlowPage extends StatelessWidget {
  const OverFlowPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Overflow Example'),
      ),
      body: Center(
        child: Container(
          width: 200,
          height: 200,
          color: Colors.blue,
          child: Stack(
            clipBehavior: Clip.none,
            children: <Widget>[
              Positioned(
                left: 50,
                top: 50,
                child: Container(
                  width: 150,
                  height: 150,
                  color: Colors.red,
                ),
              ),
              Positioned(
                right: -50,
                bottom: -50,
                child: OverflowBox(
                  maxWidth: 300,
                  maxHeight: 300,
                  child: Container(
                    width: 150,
                    height: 150,
                    color: Colors.green,
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}